<?php
use  yii\helpers\Url;
use  yii\helpers\Html;
$record = \backend\modules\models\setting\Record::getAll();
?>
<footer>
  <div class="container-lg">
    <div class="row">
      <div class="col-8">
        <div class="row">
          <div class="col-lg-7 col-12 footer-left">
            <div>陕西能源投资股份有限公司</div>
            <div>地址：西安市雁塔区唐延路45号  邮编：710065</div>
            <div>电话：029-63355307  传真：029-63355323</div>
            <div>版权所有：陕西能源投资股份有限公司</div>
          </div>
          <div class="col-lg-5 col-12 footer-visit">
            <div class="visit-wrap visit-curr"><div>本日访问人数：</div><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div>
            <div class="visit-wrap visit-total"><div>总体访问人数：</div><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div>
          </div>
        </div>
      </div>
      <div class="col-4 footer-img-wrap">
        <a class="message" href="<?= Url::to(['site/message'])?>">
          <i class="iconfont icon-liuyan"></i>
          <div class="text-center"><span>给我们留言</span></div>
        </a>
        <img class="qrcode-img" src="/assets/qr_code.png" alt="">
      </div>
    </div>
  </div>
</footer>
<script>
  let n1 = <?=Html::encode($record['today'])?>;
  let n2 = <?=Html::encode($record['all'])?>;
  function visitNumberErgodic(el,str){
    let arr = String(str).split("")
    let arrLen = arr.length-1;
    let spanLen =  el.find("span").length-1;
    for(let i = arrLen;i > -1;i--){
        el.find("span").eq(spanLen--).text(arr[i])
        console.log(spanLen)
    }
  }
  visitNumberErgodic($(".visit-curr"),n1)
  visitNumberErgodic($(".visit-total"),n2)
</script>
